﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvdDonk.Bomberman.Menu;
using MvdDonk.Bomberman.Screens.Base;
using Microsoft.Xna.Framework;

namespace MvdDonk.Bomberman.Screens
{
    class WaitingOnHostServerScreen : MenuScreen
    {
        private JoinServerScreen parent;
        public WaitingOnHostServerScreen(JoinServerScreen parent)
            : base("Waiting on host", MenuOrientation.Vertical)
        {
            IsPopup = true;
            this.parent = parent;

            MenuEntry startGameDev = new MenuEntry("Start game DEV");
            startGameDev.Selected += StartGameDevSelected;
            MenuEntries.Add(startGameDev);
        }

        void StartGameDevSelected(object sender, EventArgs e)
        {
            ScreenManager.AddScreen(new GameplayScreen());
        }

        protected override void OnCancel()
        {
            base.OnCancel();
            parent.PopupCancelled();
        }
    }
}
